The invention relates generally to communicating content over a network, and more particularly but not exclusively to selectively determining whether to concatenate data into a packet based on a transaction boundary.
Nagle's algorithm concatenates data into a packet to modify a number of packets transmitted over a network. Nagle's algorithm typically concatenates data into a packet until an acknowledgement (ACK) is received or a predetermined amount of data is concatenated in the packet. Subsequently, the packet is transmitted over the network. Nagle's algorithm, named after John Nagle, is described in Request for Comments (RFC) 896 (available at http://www.faqs.org/rfcs/rfc896.html).
Some TCP stacks may also implement a Delayed ACK algorithm. The Delayed ACK algorithm is directed towards minimizing network traffic when many small packets may require many ACK responses. The Delayed ACK algorithm sends an ACK after every two packets have been received, or based on a timing event. In one embodiment, the Delayed ACK algorithm may send an ACK after 200 msec has elapsed, if it has not detected the receipt of a second packet. The Delayed ACK algorithm is described in RFC 1122 (available at http://www.faqs.org/rfcs/rfc1122.html).
While the use of Nagle's algorithm may improve behavior for a network, interactions between Nagle's algorithm and the Delayed ACK algorithm may cause an extra delay in a sending of a packet. Because Nagle's algorithm waits for an ACK before sending a packet, the operation of the Delayed ACK algorithm may cause an undesirable delay in packet transmission. For example, Nagle's algorithm may wait until a delayed ACK is received, before sending the packet, even though the transaction is complete. This delay may be particularly egregious for a transaction based protocol where multiple transactions may be sent in the same session. An example of such a protocol is persistent HTTP 1.1. This situation is documented in http://www.w3.org/Protocols/HTTP/Performance/Nagle.
Therefore, there is a need in the industry to improve how network packets are managed. Thus, it is with respect to these considerations and others that the present invention has been made.